{% extends "main.html" %}

{% block header %}
<title>{{ title }} - 最简洁清新的搜索阅读体验</title>
<link rel="stylesheet" href="static/novels/css/index.css">
{% endblock %}

{% block content %}
<!--<div class="alert alert-warning center-block">-->
<!--<p class="close" style="position: absolute;left: 10px;" data-dismiss="alert">-->
<!--&times;-->
<!--</p>-->
<!--<p style="text-align: center">-->
<!--<strong>注意！</strong>搜索又慢了，怪我咯~-->
<!--</p>-->
<!--</div>-->
<div class="header">
    <a target="_blank" href="https://github.com/howie6879/owllook"><img
            style="position: absolute; top: 0; left: 0; border: 0;"
            src="static/novels/img/github_owl.png"
            alt="Fork me on GitHub"
            data-canonical-src="static/novels/img/github_owl.png"></a>
    {% if is_login %}
    {% include "login.html" %}
    {% else %}
    <div class="login">
        <a class="btn btn-primary pull-right" href="#" role="button" data-toggle="modal" data-target="#login">登录</a>
    </div>
    {% endif %}
</div>
<div class="container">
    <div class="logo">
        <img class="img-responsive center-block" src="static/novels/img/logo_home.png" alt="owllook">
    </div>
    <form action="/search" method="get" class="home_search center-block">
        <div class="search center-block">
            <input type="text" name="wd" class="form-control center-block" placeholder="请输入小说名">
            <input class="btn btn-default" type="submit" value="Owl Search">
        </div>
    </form>
    <div class="owl_search_ranking center-block">
        <span style="font-size: 100%" class="label label-info">搜索排行:</span>
        {%for novels_name in search_ranking%}
        <a target="_blank" href="/search?wd={{novels_name.keyword}}"><span
                class="label label-primary">{{novels_name.keyword}}</span></a>
        {%endfor%}
        <a target="_blank" href="/md"><span class="label label-primary" style="background: #d4507d">更多</span></a>
    </div>
</div>
{% endblock %}
